﻿using Rbac.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rbac.Domain.Interface
{
	/// <summary>
	/// 角色接口
	/// </summary>
	public interface IRoleRepository
	{
		/// <summary>
		/// 角色查询
		/// </summary>
		/// <param name="roleName"></param>
		/// <returns></returns>
		List<Role> SearchRoles(string roleName);
		/// <summary>
		/// 所有角色
		/// </summary>
		/// <returns></returns>
		IQueryable<Role> GetRoles();
		/// <summary>
		/// 添加
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		int Add(Role entity);
		/// <summary>
		/// 修改
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		int Update(Role entity);
		/// <summary>
		/// 删除
		/// </summary>
		/// <param name="idList"></param>
		/// <returns></returns>
		int Delete(int loginUserId,params int[] idList);
	}
}
